File-aware priority driver

ABSTRACT

The disclosure is related to systems, devices, and methods for file-aware priority drivers in data storage devices. In one example, a device may comprise a data storage medium, an interface circuit to communicate with a host, a driver configured to retrieve file system information related to a structured input/output (I/O) command from the host, select priority attributes based on the file system information, and prioritize execution of the I/O command based on the priority attributes. Another embodiment may be a method comprising inspecting characteristics of an I/O request, choosing priority attributes for the I/O request based on the characteristics, and executing operations in an order based on the priority attributes.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application claims priority to U.S. provisional patent application Ser. No. 61/584,188, filed Jan. 6, 2012, entitled “Smart File Location;” Ser. No. 61/584,195, filed Jan. 6, 2012, entitled “Temporal File Defragment;” Ser. No. 61/584,196, filed Jan. 6, 2012, entitled “Cache File Preloading;” Ser. No. 61/584,197, filed Jan. 6, 2012, entitled “File-Aware Caching Driver;” Ser. No. 61/584,201, filed Jan. 6, 2012, entitled “File-Aware Priority Driver;” and Ser. No. 61/584,204, filed Jan. 6, 2012, entitled “High Priority Read and Write,” the contents of which are hereby incorporated by reference in their entirety.

BACKGROUND

The performance of data storage devices (DSDs) may be limited by the information available to the device from a host system. In some data storage systems, the data storage device receives very limited information from the host, such as file size and a Logical Block Address. Therefore, systems and methods are needed for improving data storage device performance.

SUMMARY

A device may comprise a data storage medium, an interface circuit to communicate with a host, and a driver configured to retrieve file system information related to a structured input/output (I/O) command from the host, select priority attributes based on the file system information, and prioritize execution of the I/O command based on the caching attributes.

In another embodiment, a system may comprise a host device and at least one driver operating on the host device configured to intercept a data input/output (I/O) request from the host device to a data storage device, obtain information from the host device about the I/O request, assign priority attributes to the I/O request based on the information, and store the priority attributes to a table accessible to the data storage device.

Another embodiment may be a method comprising inspecting characteristics of a data input/output (I/O) request, choosing priority attributes for the I/O request based on the characteristics and user-defined settings, and determining an order to execute operations based on the priority attributes.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an illustrative embodiment of a system of file-aware priority drivers;

FIG. 2 is a diagram of an another illustrative embodiment of a system of file-aware priority drivers;

FIG. 3 is a diagram of a an illustrative embodiment of a data storage device employing file-aware priority drivers; and

FIG. 4 is a flowchart of an illustrative embodiment of a method of employing file-aware priority drivers.

DETAILED DESCRIPTION

In the following detailed description of the embodiments, reference is made to the accompanying drawings which form a part hereof, and in which are shown by way of illustration of specific embodiments. It is to be understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present disclosure.

Host devices may send data read or write requests to data storage devices in the form of structured input/output (I/O) commands or requests. As used herein, a structured command is a command defined by an interface-standard command format, such as a read or write command of a data storage interface standard (such as SATA). A structured command must be in the form of a data structure compatible with the interface of a data storage device. Operating system information (or file system information), such as information specific to files or operation threads, are not included as part of the structured I/O command request. A thread may be a unit of processing on an operating system, such that a single application may consist of numerous threads running simultaneously.

Data storage devices may benefit from receiving additional information about a file or I/O operation thread from a host system. This may be improved by using drivers to communicate between devices. Drivers can be computer programs designed to facilitate communication or interaction between applications or other programs, and hardware devices (e.g. between a host computer application and a data storage device). A kernel may be a part of an operating system that acts as a “bridge” between computer applications and the hardware devices of a system, such as the CPU, memory, and other hardware components. In some embodiments, systems may be improved by a system of drivers operating in the kernel of the host operating system to collect or retrieve data about a file or input/output (I/O) operation thread, and associate corresponding priority attributes with the file or operation. The data storage device can use these priority attributes set by the drivers to make informed decisions regarding files or operations, potentially improving response times, reducing latency, or otherwise improving device performance. As an example, priority could be used to determine in what order various read and write commands should be executed.

FIG. 1 depicts an embodiment of a system for file-aware priority drivers generally designated 100. The system 100 may include a host 102 and a data storage device (DSD) 104. The host 102 may also be referred to as the host system or host computer. The host 102 can be a desktop computer, a laptop computer, a server, a tablet computer, a telephone, a music player, another electronic device, or any combination thereof. Similarly, the DSD 104 may be any of the above-listed devices, or any other device which may be used to store or retrieve data. The host 102 and DSD 104 may be connected by way of a wired or wireless connection, or by a local area network (LAN) or wide area network (WAN). In some embodiments, the DSD 104 can be a stand-alone device not connected to a host 102, or the host 102 and DSD 104 may both be part of a single unit.

The host 102 can include one or more file-aware drivers (FAD) 106. The FAD 106 may be drivers running in the kernel of the operating system 108 of the host 102 and may facilitate operations between the host 102 and the DSD 104. The FAD 106 can comprise software running on the host device, configurable controllers, or circuits designed to implement the functions described herein. In some embodiments, some or all of the FAD 106 may be incorporated into the DSD 104. For example, a priority policy engine driver could be incorporated on the DSD 104, while a file system filter driver and a table driver could be implemented on the host 102.

When the host 102 transmits a structured input/output (I/O) command to the DSD 104, the FAD 106 can monitor or intercept file activity in the operating system 108, including data about files themselves or the applications or threads utilizing or requesting the files. This file system data may be used by the FAD 106 or DSD 104 to improve performance or operability between the host 102 and the DSD 104. For example, the FAD 106 may send the data to the DSD 104 directly, or use the data to assign priority attributes to the I/O command or associated file. These file system data or priority attributes can be sent to the DSD 104 as part of or separately from the structured I/O command itself. The DSD 104 may use the data or priority attributes to intelligently determine in what order to execute commands received from the host 102.

FIG. 2 depicts a diagram of a system with file-aware drivers generally designated 200. The system 200 may include one or more file-aware drivers (FAD) 202, a file system 204, and a data storage device (DSD) 206 which can store, retrieve, or modify data file(s) 218. The file system 204 may be the file system of a host device, used for organizing, storing, and retrieving data. Example file systems may include FAT, NTFS, or HFS Plus. The DSD 206 may be any of the devices listed for the data storage device 104, or any other device for data storage.

In the embodiment depicted in FIG. 2, the file-aware drivers (FAD) 202 may consist of a system of device drivers running in the operating system of a host device, which system may include a file system filter driver 208, a table driver 210, a priority policy engine 212, a device filter driver 214, and an Advanced Host Controller Interface (AHCI) driver 216. In some embodiments, the FAD 202 may be software, one or more programmable controllers, circuits, CPUs, or any combination of elements capable of detecting attributes of file activity within a system and associating these attributes with files or I/O operations in such a way as to affect a behavior of the data storage device 206.

The file system 204 may initiate I/O requests to read or write data to the data storage device 206. The file system filter driver 208 can interact with the file system 204 to intercept or retrieve file activity from the operating system. This may include gathering information about file(s) such as the file name, file path, file extension, file size, or logical block address (LBA) for the entire file. The intercepted file activity may also include other information, such as the system power source (e.g. A/C power or battery power), or the name or identifier (e.g. the type of accessing program, such as .exe or .dll) of the accessing executable, other information, or any combination thereof. The file system filter driver 208 may then pass relevant file information to the priority policy engine 212 through the table driver 210.

As an example, the host operating system may issue a structured I/O command requesting a block of file data 218 from the DSD 206 using a logical block address (LBA) associated with the block of data. The file system filter 208 may determine the file path and file size of the file associated with the requested data 218, as well as the type of program requesting the data. All this information may be passed along with the data I/O request to the priority policy engine 212 by way of the table driver 210.

The table driver 210 may maintain the relationship between a file or piece of data 218, the thread ID of the processing thread requesting the input/output (I/O) operation, and the file information from the file system filter driver 208 or the priority attributes set by the priority policy engine 212. In some embodiments, the table driver 210 may only maintain the relationship between the file and the file information, or between the thread ID and the file information. The table driver 210 may maintain these relationships in a table, database, self-contained data packets, other formats, or a combination thereof.

The priority policy engine (PPE) 212 can inspect the information collected by the file system filter driver, such as file extension, file size, file path, creation attributes, and the name of the accessing executable. This information may be sent to the PPE 212 by the table driver 210, or the PPE 212 may independently inspect a table, database, or other data structure maintained by the table driver 210. Upon inspection of the file properties, the PPE 212 can determine whether to set priority attributes for the current file and/or I/O operation thread immediately, or to delay setting priority attributes until later. For example, if file information is unavailable or insufficient at the file system filter driver 208 level, the PPE 212 may request to be called again at the device driver filter 214 level. Furthermore, priority attributes may be set at one or more points in the lifecycle of a file object, such as on first access of the file, subsequent accesses, pre-read, pre-write, or other points. When priority attributes have been set, the table driver 210 may then update to maintain the relationship between the file or operation thread and the priority attributes set by the PPE 212.

The priority attributes set by the PPE 212 can be used to determine in what order to execute read or write commands, or for other operations of the data storage device 206. Data storage devices may receive or process a number of I/O requests simultaneously or in rapid succession, and may select the order in which the requests will be processed. The PPE 212 may select priority attributes based upon configurable settings. For example, a user of the host system 102 or data storage device 104 may be able to configure which types of attributes, files, or program requests have higher priority and should be executed more quickly, such as prioritizing I/O operations from .exe executable programs. In some embodiments, the PPE 212 may have programmed or automatic settings on how to assign priority attributes. In other embodiments, the PPE 212, the system of drivers 202, or the data storage device 206 may be configured to monitor file usage and data access and modify priority policies according to usage.

If the priority attributes have already been set by the priority policy engine (PPE) 212, the device filter driver 214 may retrieve the priority attributes from the table driver 210. If the PPE 212 has not yet set the priority attributes, the device filter driver 214 may request priority attributes from the PPE 212 through the table driver 210. The device filter driver 214 may provide any additional available information to the PPE 212 to facilitate the selection of priority attributes. Once selected, the device filter driver 214 can pass the priority attributes to the Advanced Host Controller Interface (AHCI) driver 216. Depending on the type of ACHI driver 216 in the system, the device filter driver 214 may do this by placing the priority attributes into a Small Computer System Interface (SCSI) Request Block (SRB), a Command Descriptor Block, or other block of data and instructions for the data storage device (DSD) 206 recognized by the AHCI driver 216.

The Advanced Host Controller Interface (AHCI) driver 216 can receive the priority attributes from the device filter driver 214. The AHCI driver may then pass the priority attributes to the data storage device 206. If the priority attributes were sent to the AHCI driver as part of an SCSI Request Block (SRB) or similar data block, the AHCI driver 216 can copy out the attributes. As an example, the AHCI driver 216 may copy the priority attributes into a Frame Information Structure (FIS), which is a block of data for Direct Memory Access (DMA) reads and writes. This may be accomplished by setting a priority bit in an FIS for First-Party Direct Memory Access (FPDMA) Queued read or write commands, to take advantage of Native Command Queuing (NCQ) technology in Serial ATA drives. The priority attributes may be sent to the data storage device separate from the structured I/O command issued by the host

After receiving the priority attributes, the data storage device 206 may use the attributes to determine priority behavior or for other functions. For example, it may use the priority attribute values to determine an order of executing operations, with certain priority attribute values resulting in immediate or high-priority execution, and other values resulting in low-priority execution.

The system of FAD 202 depicted in FIG. 2 is an illustrative embodiment only, and it should be apparent to one skilled in the art that the functions described could be performed by more or fewer drivers, or that some functionality could be implemented as part of the data storage device rather than in the host system. For example, a single driver could perform all the functions of obtaining file information, assigning priority attributes, maintaining an association table, and passing the information to a data storage device. Alternately, drivers could obtain file information and pass it to a data storage device, where priority attributes would then be selected. In other embodiments, file system information could be determined and stored in a table on the host. The data storage device could access and retrieve the file system information from the host and set priority attributes based on the file system information. Removing, adding, consolidating, or restructuring the drivers could eliminate the need for some functions or behaviors described herein, or add additional requirements.

FIG. 3 is a diagram of another illustrative embodiment of a system utilizing file-aware drivers (FAD), generally designated 300. Specifically, FIG. 3 provides a functional block diagram of a disc drive data storage device (DSD) 300. The DSD 300 may be a data storage device such as the device 104 shown in FIG. 1. The data storage device 300 can communicate with a host device 302 (such as the host system 102 shown in FIG. 1) via a hardware/firmware based host interface circuit 304 that may include a connector (not shown) that allows the DSD 300 to be physically removed from the host 302. The buffer 312 can temporarily store user data during read and write operations and can include a command queue (CQ) 313 where multiple pending access operations can be temporarily stored pending execution. A nonvolatile solid state memory 303, such as Flash memory, can be included for additional cache or buffer memory, or to provide additional addressable data storage for the DSD 300. The DSD 300 can include a programmable controller 306 with associated memory 308 and processor 310. In some embodiments, the controller 306 may also include file-aware drivers (FAD) 314, or elements to perform one or more functions describes for FAD herein, such as using file information from the host 302 operating system to assign priority attributes.

Further, FIG. 3 shows the DSD 300 can include a read/write (R/W) channel 317, which can encode data during write operations and reconstruct user data retrieved from disc(s) 309 during read operations. A preamplifier/driver circuit (preamp) 318 can apply write currents to the head(s) 319 and provides pre-amplification of readback signals. A servo control circuit 320 may use servo data to provide the appropriate current to the coil 324 to position the head(s) 319 over the disc(s) 309. The controller 306 can communicate with a processor 322 to move the head(s) 319 to the desired locations on the disc(s) 309 during execution of various pending commands in the command queue 313.

The host 302 (or in some embodiments, the controller 306 or data storage device 300) may be loaded with a system of file-aware device drivers (FAD) 314. The FAD 314 can collect information from the host 302 about files or system threads requesting I/O operations, and use this information to assign priority attributes to the files or threads. These priority attributes may be sent to the DSD 300, which can use the attributes to organize pending operations in the buffer 312 and command queue 313. Intelligent priority queuing can result in important operations being executed more quickly, and important files being written or retrieved more quickly than operations of lesser importance.

Turning now to FIG. 4, a flowchart of an illustrative embodiment of a method of employing file-aware priority drivers is shown and generally designated 400. The depicted method could be used in a system of file-aware drivers such as the system depicted in FIG. 2. The method 400 can involve a host system sending an input or output request (I/O request) to read data from or write data to a data storage device, at 402. The request may originate from an application or program running on the host system, or from a particular application thread.

Once an I/O request has been initiated at 402, the method 400 may involve a file system filter driver intercepting the I/O request and passing information about the request to a table driver, at 404. The information passed by the file system filter driver may be about the file involved in the I/O request (e.g. file path, file extension, file size, or logical block address (LBA)), the requesting application or thread (e.g. the name of the program or type of application, such as .exe or .dll), other information (e.g. whether the system power source is A/C power or battery power), or any combination thereof. The file system filter driver may also instruct the table driver to request priority attributes from a priority policy engine.

The method 400 may next involve the table driver passing the information about the I/O request to a priority policy engine (PPE), and requesting that the PPE select priority attributes, at 406. The table driver may also maintain the relationship between the file involved in the I/O request, the requesting program, and the file information or priority attributes. In some embodiments, the table driver may maintain the relationship between, for example, the requested file and all the file information from the file system filter driver, and then later replace the file information with the priority attributes selected by the PPE. In other embodiments, the table driver may retain all available information even after priority attributes have been selected. In still other embodiments, the table driver may never maintain a list of all the available file information, and may simply pass the information to the PPE and retain only the selected priority attributes. It should be clear to one skilled in the art that the listed examples are illustrative only, and that there are many variations possible for accomplishing the methods disclosed herein that fall within the scope of the present invention.

After receiving information about a file or I/O request, the priority policy engine (PPE) may determine whether the information that has been provided is sufficient to select priority attributes, at 408. For example, certain information may be critical to selecting priority attributes, or may be useful for making optimal priority attribute decisions. The PPE may examine the available information and determine whether it is incomplete or otherwise insufficient to select priority attributes at this point. Whether the file information is sufficient may depend on the PPE's settings for selecting priority attributes. The PPE may select priority attributes based on user configurations, pre-programmed settings, file access and usage analysis, other factors, or any combination thereof.

If the PPE determines that the file information is insufficient at 408, the PPE may delay the selection of priority attributes until a later point, at 410. For example, the PPE may request to be called again by another driver in the system of drivers, such as the device filter driver. In such an embodiment, if the I/O request reaches the device filter driver level and the PPE has elected to delay the selection of priority attributes, the device filter driver may request the selection of priority attributes at 412. At 412, the device filter driver may also pass additional information about the I/O request or file to the PPE by way of the table driver. The device filter driver may have access to information not previously available to the PPE, or new information may otherwise have become available to the system of file-aware drivers that could aid in the selection of priority attributes. In some embodiments, new information may not be available or necessary, and priority attributes could be selected based on I/O size, logical block address(es) (LBAs), or other available information.

Once the PPE receives sufficient file information, it may select priority attributes to assign to the thread and/or file involved in the I/O request, at 414. The selection of priority attributes can occur if the initial file information provided to the PPE was sufficient at 408, or if the PPE delayed priority attribute selection until it was called at a later point, such as by the device filter driver at 412. The table driver may update the relation between the thread and/or requested file and the priority attributes.

Once priority attributes have been selected, the device filter driver may receive the attributes from the table driver and pass them to the Advanced Host Controller Interface (AHCI) driver at 416. The device filter driver may pass the priority attributes by placing them into a Small Computer System Interface (SCSI) Request Block (SRB), a Command Descriptor Block, or other block of data and instructions for the data storage device (DSD).

The AHCI driver may then pass the I/O request along with the corresponding priority attributes to the DSD, at 418. The I/O request and the priority attributes may be sent as a single command or data structure, or they may be passed to the DSD separately. The AHCI can accomplish this by putting the information into a data structure compatible with the architecture of the DSD. For example, the AHCI driver may copy the priority attributes into a Frame Information Structure (FIS) data block for Direct Memory Access (DMA) reads and writes. In some embodiments, the AHCI driver may send all the set caching attributes, or it may involve setting a priority “value,” such as by setting a “high priority” bit, or by using a broader range of priority ranking, for example 0 for very low priority and up to 10 for very high priority. In some embodiments, the AHCI driver may set a priority bit in an FIS for First-Party Direct Memory Access (FPDMA) Queued read or write commands, to take advantage of Native Command Queuing (NCQ) technology in Serial ATA drives. The DSD may then use the priority attributes to determine operation priority behavior or for other functions.

In accordance with various embodiments, the methods described herein may be implemented as one or more software programs running on a computer processor or controller. In accordance with another embodiment, the methods described herein may be implemented as one or more software programs running on a computing device, such as a personal computer that is using a disc drive. Dedicated hardware implementations including, but not limited to, application specific integrated circuits, programmable logic arrays, and other hardware devices can likewise be constructed to implement the methods described herein. Further, the methods described herein may be implemented as a computer readable medium including instructions that when executed cause a processor to perform the methods.

The illustrations of the embodiments described herein are intended to provide a general understanding of the structure of the various embodiments. The illustrations are not intended to serve as a complete description of all of the elements and features of apparatus and systems that utilize the structures or methods described herein. Many other embodiments may be apparent to those of skill in the art upon reviewing the disclosure. Other embodiments may be utilized and derived from the disclosure, such that structural and logical substitutions and changes may be made without departing from the scope of the disclosure. Moreover, although specific embodiments have been illustrated and described herein, it should be appreciated that any subsequent arrangement designed to achieve the same or similar purpose may be substituted for the specific embodiments shown.

This disclosure is intended to cover any and all subsequent adaptations or variations of various embodiments. Combinations of the above embodiments, and other embodiments not specifically described herein, will be apparent to those of skill in the art upon reviewing the description. Additionally, the illustrations are merely representational and may not be drawn to scale. Certain proportions within the illustrations may be exaggerated, while other proportions may be reduced. Accordingly, the disclosure and the figures are to be regarded as illustrative and not restrictive. 

What is claimed is:
 1. A device comprising: an interface circuit to receive a specific structured input/output (I/O) command from a host; a driver configured to: obtain file system information from the host related to the specific structured I/O command via the interface circuit, the specific structured I/O command including a command to read data from or write data to the device, the file system information including information associated with the specific structured I/O command that is not received by the interface circuit as part of the specific structured I/O command; select priority attributes based on the file system information; and prioritize execution of the specific structured I/O command based on the priority attributes.
 2. The device of claim 1 wherein the file system information comprises host file system information that is not transmitted with the specific structured I/O command.
 3. The device of claim 1, wherein the driver is a controller loaded with software designed to execute the functions of the driver.
 4. The device of claim 1 wherein the priority attributes are selected based on settings set by a user.
 5. The device of claim 1 further comprising the driver configured to maintain a relationship between the specific structured I/O command and the priority attributes.
 6. The device of claim 1 wherein the priority attributes are used by the data storage device to determine an order for executing operations.
 7. The device of claim 1 wherein the file system information comprises information identifying a file involved in the specific structured I/O command.
 8. The device of claim 1 wherein the file system information comprises information identifying an application which initiated the specific structured I/O command.
 9. The device of claim 1 wherein the file system information comprises information identifying a power source.
 10. The device of claim 1 wherein the file system information comprises information identifying a file path, a file extension, a file size, a file name, a file logical block address (LBA), I/O size of the whole file, a name of the program accessing the file, an extension of the program accessing the file, and a device power source.
 11. A system comprising: a host device; and at least one driver operating on the host device configured to: intercept a data input/output (I/O) request from the host device to a data storage device, the data I/O request including a request to read data from or record data to a storage medium of the data storage device; obtain information from the host device about the I/O request; assign priority attributes to the I/O request based on the information; and store the priority attributes to a table accessible to the data storage device.
 12. The system of claim 11 further comprising the data storage device which accesses the table and uses the priority attributes to determine an order for executing commands.
 13. The system of claim 11 wherein the at least one driver comprises a file system filter driver configured to intercept the I/O request from the host device and obtain data about the I/O request from the host device.
 14. The system of claim 13 wherein the at least one driver further comprises a priority policy engine configured to assign priority attributes to the I/O request based on the data from the host device.
 15. The system of claim 14 wherein the at least one driver further comprises a table driver configured to request priority attributes from the priority policy engine and maintain a relationship between the I/O request and the priority attributes.
 16. The system of claim 15, wherein the at least one driver further comprises an Advanced Host Controller Interface (AHCI) driver configured to place the I/O request and the priority attributes into a data structure based on the data storage device, and send the data structure to the data storage device.
 17. The system of claim 16 wherein the at least one driver further comprises a device filter driver configured to request priority attributes for the I/O request if priority attributes have not been set, and to send the I/O request and priority attributes to the Advanced Host Controller Interface (AHCI) driver.
 18. The system of claim 11, wherein the I/O request comprises an application thread initiating the I/O request and a file to be transmitted between the host device and the data storage device pursuant to the I/O request.
 19. A method comprising: inspecting characteristics associated with a data input/output (I/O) request from a host device, the data I/O request including a request to read data from or record data to a storage medium of a data storage device, the characteristics obtained from the host device and not included as part of the data I/O request; choosing priority attributes for the I/O request based on the characteristics and user-defined settings; and executing operations in an order based on the priority attributes.
 20. The method of claim 19 further comprising delaying choosing the priority attributes if the characteristics of the I/O request do not meet certain criteria.
 21. The method of claim 19 further comprising intercepting the characteristics from a host file system.
 22. The method of claim 19 further comprising maintaining a relationship between the I/O request and the priority attributes.
 23. The method of claim 19 further comprising sending the I/O request and the priority attributes to a data storage device for execution of the I/O request.
 24. The device of claim 1 further comprising: the interface circuit including a connector configured to physically disconnect the device from the host. 